#include "led.h"
void led_gpio_init(void)
{
	/* set GPIO5_GDIR to configure GPIO5_IO03 as output
	 * GPIO5_GDIR  0x020AC000 + 0x4
	 * bit[3] = 1
	 */
	 GPIO5->GDIR |= (1<<3);

}
		  			 		  						  					  				 	   		  	  	 	  
void led_ctl(int on)
{
	if (on) /* on: output 0*/
	{
		/* set GPIO5_DR to configure GPIO5_IO03 output 0
		 * GPIO5_DR 0x020AC000 + 0
		 * bit[3] = 0b0
		 */
		GPIO5->DR &= ~(1<<3);
	}
	else  /* off: output 1*/
	{
		 /* set GPIO5_DR to configure GPIO5_IO03 output 1
		 * GPIO5_DR 0x020AC000 + 0
		 * bit[3] = 0b1
		 */ 
		GPIO5->DR |= (1<<3);
	}
}
		  			 		  						  					  				 	   		  	  	 	  

